<!doctype html>
<html class="no-js fixed-layout">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>修改密码</title>
  <meta name="description" content="修改密码">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="../../../assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="../../../assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="../../../assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="../../../assets/css/admin.css">
	 <script type="text/javascript"   src="../../../js/jquery-1.11.3.min.js"></script>
	 <script type="text/javascript"  src="../../../js/cookie_util.js"></script>
	<script type="text/javascript">
	 	$(function(){
		 	var username = getCookie("username");
		 	$("#username").val(username);
		 	$("#modify_btn").click(function(){
		 		alert($("#pwd_form").serialize());
				$.ajax({
					url:"http://localhost:8080/ciic-vote/user/modifyPwd2.do",
					type:"post",
					data:$("#pwd_form").serialize(),
					dataType:"json",
					success:function(result){
						if(result.status == 0){
							alert("修改成功");
						}
					}
				});
			});
	 	});
	 </script>
</head>
<body>
<header class="am-topbar am-topbar-inverse admin-header">
  <div class="am-topbar-brand">
    <strong>投票系统</strong> <small>后台管理</small>
  </div>

  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>

  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
      <li class="am-dropdown" data-am-dropdown>
        <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
          <span class="am-icon-users"></span> <span id="userName"></span> <span class="am-icon-caret-down"></span>
        </a>
        <ul class="am-dropdown-content">
          <li><a href="javascript:void(0)" onclick="exit();"><span class="am-icon-power-off"></span> 退出</a></li>
        </ul>
      </li>
      <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
    </ul>
  </div>
</header>

<div class="am-cf admin-main">
  <!-- sidebar start -->
  <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
      <ul class="am-list admin-sidebar-list">
        <li><a href="success2.html"><span class="am-icon-home"></span> 首页</a></li>
        <li class="admin-parent">
          <a class="am-cf" data-am-collapse="{target: '#collapse-nav'}"><span class="am-icon-file"></span> 用户管理 <span class="am-icon-angle-right am-fr am-margin-right"></span></a>
          <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
            <li><a href="modify_pwd2.html"><span class="am-icon-puzzle-piece"></span> 修改密码</a></li>
          </ul>
        </li>
        <li class="admin-parent">
          <a class="am-cf" data-am-collapse="{target: '#collapse-nav2'}"><span class="am-icon-file"></span> 活动管理 <span class="am-icon-angle-right am-fr am-margin-right"></span></a>
          <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav2">
            <li><a href="../../activity/manager/create_activity_manager.html" class="am-cf"><span class="am-icon-check"></span> 创建活动<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span></a></li>
            <li><a href="../../activity/manager/findAll_manager.html"><span class="am-icon-puzzle-piece"></span> 查看活动</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
  <!-- sidebar end -->

  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">修改密码</strong> / <small>Modifyt PassWord</small></div>
      </div>

      <hr/>

      <div class="am-g">
        <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
        </div>
        <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
          <form class="am-form am-form-horizontal" id="pwd_form">
			
			<input type="hidden" id="username" name="username">
			
			<div class="am-form-group">
              <label for="password" class="am-u-sm-3 am-form-label">当前密码</label>
              <div class="am-u-sm-9">
                <input type="password" id="oldPwd" placeholder="请输入 当前密码" name="oldPwd" style="width:300px;">
              </div>
            </div>

            <div class="am-form-group">
              <label for="password" class="am-u-sm-3 am-form-label">新密码</label>
              <div class="am-u-sm-9">
                <input type="password" id="newPwd1" placeholder="请输入 新密码" style="width:300px;">
              </div>
            </div>
			
			<div class="am-form-group">
              <label for="password" class="am-u-sm-3 am-form-label">确认新密码</label>
              <div class="am-u-sm-9">
                <input type="password" id="newPwd2" placeholder="请再次输入 新密码" name="newPwd" style="width:300px;">
              </div>
            </div>
            <div class="am-form-group">
              <div class="am-u-sm-9 am-u-sm-push-3">
                <button type="button" class="am-btn am-btn-primary" id="modify_btn">修改</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>

    <footer class="admin-content-footer">
    </footer>
  </div>
  <!-- content end -->
</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<script src="../../../assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="../../../assets/js/amazeui.min.js"></script>
<script src="../../../assets/js/app.js"></script>
<script src="../../../js/exit_and_showname.js"></script>
</body>
</html>
